<?php

use think\migration\Seeder;

class ControlSettingListData extends Seeder
{
    /**
     * 管控 - 目标清单列表
     */
    public function run()
    {
        $table = $this->table('control_setting_list');
        $rows  = [
            [
                //step1:污染物名称
                'type'                    => 'SO2',

                //step2:相关管控ID
                'plan_id'                 => '1',

                //step3:列表中相关ID
                'company_id'              => '1',
                'drain_id'                => '1',
                'drain_name'              => '1#',
                'operation_concentration' => '50',
                'operating_efficiency'    => '10',
                'emissions'    => '100',
                'contribution_degree'     => '0.6',

                //step4:相关其他ID
                'industry_id'             => '1',
                'region_id'               => '1',

                //插入时间
                'create_time'             => time() - 3600,
                'control_status'          => 0,
                'update_time'             => time(),
            ],
            [
                //step1:污染物名称
                'type'                    => 'NO2',

                //step2:相关管控ID
                'plan_id'                 => '1',

                //step3:列表中相关ID
                'company_id'              => '1',
                'drain_id'                => '1',
                'drain_name'              => '1#',
                'operation_concentration' => '50',
                'operating_efficiency'    => '10',
                'emissions'    => '100',
                'contribution_degree'     => '0.6',

                //step4:相关其他ID
                'industry_id'             => '1',
                'region_id'               => '1',

                //插入时间
                'create_time'             => time() - 3600,
                'control_status'          => 0,
                'update_time'             => time(),
            ],
        ];
        $table->insert($rows)->save();
    }
}